home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Games / Pentominoes 2.0 / Pent code / Horizontal bars wipe.c next >
C/C++ Source or Header  |  1995-07-29  |  2KB  |  49 lines

  1. #include "timing.h"
  2. #include "Horizontal bars wipe.h"
  3.  
  4. #define CorrectTime 1
  5.  
  6. void HorizontalBarsWipe(GrafPtr sourceGrafPtr, GrafPtr destGrafPtr, Rect boundsRect)
  7. {
  8.     RgnHandle        leftRgn, rightRgn, fullRgn;
  9.     short            offset;
  10.     short            iter;
  11.     short            barHeight;
  12.     Point            zeroPoint;
  13.     short            theWindowHeight, theWindowWidth;
  14.     
  15.     theWindowWidth=boundsRect.right-boundsRect.left;
  16.     theWindowHeight=boundsRect.bottom-boundsRect.top;
  17.     offset=2;
  18.     barHeight=1;
  19.     zeroPoint.h=0;
  20.     zeroPoint.v=barHeight;
  21.     
  22.     leftRgn=NewRgn();
  23.     OpenRgn();
  24.         MoveTo(0, 0);
  25.         iter=0;
  26.         while (iter<theWindowHeight)
  27.         {
  28.             Line(offset, 0);
  29.             Line(0, barHeight);
  30.             Line(-offset, 0);
  31.             Line(0, -barHeight);
  32.             Move(0, barHeight*2);
  33.             iter+=barHeight*2;
  34.         }
  35.     CloseRgn(leftRgn);
  36.     OffsetRgn(leftRgn, boundsRect.left, boundsRect.top);
  37.     
  38.     rightRgn=NewRgn();
  39.     OpenRgn();
  40.         MoveTo(theWindowWidth, barHeight);
  41.         iter=0;
  42.         while (iter<theWindowHeight)
  43.         {
  44.             Line(-offset, 0);
  45.             Line(0, barHeight);
  46.             Line(offset, 0);
  47.             Line(0, -barHeight);
  48.             Move(0, barHeight*2);
  49.